<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLiabilitiesTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('liability', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();

			//关联tyw_financing
			$table->integer('financing_id');
			//double 13 2 货币资金
			$table->double('currency_money',13,2);
			//double 13 2 交易性金融资产
			$table->double('transactional_financial_assets',13,2);
			//double 13 2 应收票据
			$table->double('bill_receivable',13,2);
			//double 13 2 应收股利
			$table->double('dividends_receivable',13,2);
			//double 13 2 应收利息
			$table->double('interest_receivable',13,2);
			//double 13 2 应收账款
			$table->double('accounts_receivable',13,2);
			//double 13 2 坏账准备
			$table->double('bad_debt',13,2);
			//double 13 2 应收账款净额
			$table->double('pure_income',13,2);
			//double 13 2 应收账款净额
			$table->double('other_income',13,2);
			//double 13 2 预付账款
			$table->double('pre_income',13,2);
			//double 13 2 存货
			$table->double('inventory',13,2);
			//double 13 2 存货跌价准备
			$table->double('inventory_loss',13,2);
			//double 13 2 存货净额
			$table->double('inventory_income',13,2);
			//double 13 2 一年内到期的长期债权投资
			$table->double('long_term_cr_invest',13,2);
			//double 13 2 其它流动资产
			$table->double('other_flow_assets',13,2);
			//double 13 2 流动资产合计
			$table->double('flow_assets_total',13,2);
			//double 13 2 可供出售金融资产
			$table->double('can_sell_financial_assets',13,2);
			//double 13 2 持有至到期投资
			$table->double('expire_invest',13,2);
			//double 13 2 投资性房地产
			$table->double('invest_estate',13,2);
			//double 13 2 长期股权投资
			$table->double('stock_invest',13,2);
			//double 13 2 长期应收款
			$table->double('long_term_income',13,2);
			//double 13 2 固定资产原价
			$table->double('fixed_assets_price',13,2);
			//double 13 2 累计折旧
			$table->double('cumulative_depreciation',13,2);
			//double 13 2 固定资产净值
			$table->double('fixed_assets_worth',13,2);
			//double 13 2 固定资产减值准备
			$table->double('fixed_assets_loss',13,2);
			//double 13 2 固定资产净额
			$table->double('fixed_assets_amount',13,2);
			//double 13 2 生产性生物资产
			$table->double('productive_biological_assets',13,2);
			//double 13 2 工程物资
			$table->double('engineering_materials',13,2);
			//double 13 2 在建工程
			$table->double('projects_under_construction',13,2);
			//double 13 2 固定资产清理
			$table->double('disposal_fixed_assets',13,2);
			//double 13 2 无形资产
			$table->double('intangible_assets',13,2);
			//double 13 2 开发支出
			$table->double('development_spending',13,2);
			//double 13 2 商誉
			$table->double('goodwill',13,2);
			//double 13 2 长期待摊费用
			$table->double('long_term_prepaid_expenses',13,2);
			//double 13 2 无形资产及其他资产合计
			$table->double('intangible_assets_other_assets',13,2);
			//double 13 2 递延所得税资产
			$table->double('deferred_tax_assets',13,2);
			//double 13 2 非流动资产合计
			$table->double('non_fixedtotal_assets',13,2);
			//double 13 2 资产合计
			$table->double('total',13,2);
			//double 13 2 流动负债
			$table->double('current_liabilities',13,2);
			//double 13 2 短期借款
			$table->double('short_term_borrowing',13,2);
			//double 13 2 交易性金融负债
			$table->double('tradable_financial_liabilities',13,2);
			//double 13 2 应付票据
			$table->double('notes_payable',13,2);
			//double 13 2 应付账款
			$table->double('accounts_payable',13,2);
			//double 13 2 预收账款
			$table->double('deferred_revenue',13,2);
			//double 13 2 应付职工薪酬
			$table->double('employee_salary',13,2);
			//double 13 2 应交税费
			$table->double('payable_taxes',13,2);
			//double 13 2 应付利息
			$table->double('interest_payable',13,2);
			//double 13 2 应付股利
			$table->double('dividends_payable',13,2);
			//double 13 2 其他应付款
			$table->double('other_payables',13,2);
			//double 13 2 一年内到期的非流动负债
			$table->double('non_current_liabilities',13,2);
			//double 13 2 流动负债合计
			$table->double('total_current_liabilities',13,2);
			//double 13 2 长期借款
			$table->double('long_borrowing',13,2);
			//double 13 2 应付债券
			$table->double('bonds_payable',13,2);
			//double 13 2 长期应付款
			$table->double('long_term_accounts_payable',13,2);
			//double 13 2 专项应付款
			$table->double('specific_payable',13,2);
			//double 13 2 预计负债
			$table->double('estimated_debts',13,2);
			//double 13 2 其它长期负债
			$table->double('other_long_term_liabilities',13,2);
			//double 13 2 递延秘得税负债
			$table->double('deferred_income_tax_liabilities',13,2);
			//double 13 2 非流动负债合计
			$table->double('total_non_current_liabilities',13,2);
			//double 13 2 负责合计
			$table->double('total_liabilities',13,2);
			//double 13 2 实收资本 或股本
			$table->double('paid_in_capital',13,2);
			//double 13 2 资本公积
			$table->double('capital_reserves',13,2);
			//double 13 2 库存股
			$table->double('treasury_stock',13,2);
			//double 13 2 盈余公积
			$table->double('surplus_reserves',13,2);
			//double 13 2 未分配利润
			$table->double('undistributed_profit',13,2);
			//double 13 2 所有者权益（或股东权益）合计
			$table->double('owners_equity_total',13,2);
			//double 13 2 负债和所有者权益（或股东权益）
			$table->double('liabilities_owners_equity',13,2);
			//tinyint 2   0为年初数 1为期末数
			$table->tinyInteger('type');

			$table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('liabilities');
	}

}
